#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>

char zmh[2000][2000];
int main()
{
	int n,m,k;
	int i = 0;int j = 0;
	int count = 0;int ans = 0;
	scanf("%d%d%d",&n,&m,&k);
	for(i=0;i<n;i++)
	{
		scanf("%s",zmh[i]);
	}
	for(i=0;i<n;i++)
	{
		count = 0;
		for(j=0;j<m;j++)
		{
			if(zmh[i][j] == '.')
			     count++;
			else
				 count = 0;
			if(count>=k)
				{
					ans++;
				}

		}
	}
	count = 0;
	for(j=0;j<m;j++)
	{
		count = 0;
		for(i=0;i<n;i++)
		{
			if(zmh[i][j] == '.')
			     count++;
			else
				 count = 0;
			if(count>=k)
				{
					ans++;			
				}
		}
	}
	printf("%d",(k!=1?ans:ans/2));
	return 0;
}